package server.business.pojo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName blood_outbound
 * @author Galaxy
 */
@TableName(value ="blood_outbound")
@Data
@ColumnWidth(20) //列宽
@ContentRowHeight(20)//数据行高
@HeadRowHeight(30)//表头高
@ExcelIgnoreUnannotated   //解决不加ExcelProperty注解的，也会出现在excel中
public class BloodOutbound implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;

    /**
     * 出库单据号
     */
    @TableField(value = "outbound_number")
    @ExcelProperty(value = "出库单据号",index = 0)
    private String outboundNumber;

    /**
     * 血液信息
     */
    @TableField(value = "blood_information")
    private String bloodInformation;

    /**
     * 出库原因
     */
    @TableField(value = "outbound_reason")
    @ExcelProperty(value = "出库原因",index = 1)
    private String outboundReason;

    /**
     * 出库时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "outbound_time")
    @ExcelProperty(value = "出库时间",index = 2)
    private Date outboundTime;

    /**
     * 出库地址
     */
    @TableField(value = "outbound_location")
    @ExcelProperty(value = "出库地址",index = 3)
    private String outboundLocation;

    /**
     * 取血人
     */
    @TableField(value = "blood_taker")
    @ExcelProperty(value = "取血人",index = 4)
    private String bloodTaker;

    /**
     * 取血人工号
     */
    @TableField(value = "blood_taker_number")
    @ExcelProperty(value = "取血人工号",index = 5)
    private String bloodTakerNumber;

    /**
     * 操作人
     */
    @TableField(value = "operator")
    @ExcelProperty(value = "操作人",index = 6)
    private String operator;

    /**
     * 操作人工号
     */
    @TableField(value = "operator_number")
    @ExcelProperty(value = "操作人工号",index = 7)
    private String operatorNumber;

    /**
     * 血液id
     */
    @TableField(value = "blood_id")
    private String bloodId;

    /**
     * 删除
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private int isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = -9168570643978334518L;
}